package cn.gyouzhe.service.impl;

import cn.gyouzhe.entity.Category;
import cn.gyouzhe.mapper.CategoryMapper;
import cn.gyouzhe.service.ICategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 分类service
 *
 * @author wangchuan
 * @datetime 2018/3/4 11:21
 */
@Service
@Transactional(readOnly = true)
public class CategoryService implements ICategoryService{
    @Autowired
    private CategoryMapper categoryMapper;
    /**
     * 查询所有分类
     * @return map分类
     */
    @Override
    public List<Category> selectCategory() {
        return categoryMapper.selectCategory();
    }
}
